<!DOCTYPE html>
<html>
<head>
    <include file="./public/sty.html"/>
    <style>
        .anModebtn{background: #ff9932; margin-top:20px; border:none;}
        .anModebtn{width: 100%; height: 100%; background: none; cursor: pointer; color: #fff; font-size: 16px;}
        .yz1,.yz2,.yz3,.yz4,.yz5,.yz6{text-align: left !important; margin-left: 20px;}
        .yz1 :before,.yz2 :before,.yz3 :before,.yz4 :before,.yz5 :before,.yz6 :before{ font-family: iconfont;
            font-style: inherit;
            padding: 0 5px;
            font-size: 14px;content: "\E60D";}
    </style>
</head>
<body>
<div id="app" class="forgetPwd">
    <include file="./public/header.html"/>

    <div class="container notSign fix pt15" s="[object Object]">
        <div class="userMain mgb10">
            <ul class="queue">
                <li class="now"><span>选择验证方式</span><i></i></li>
                <li><span>身份验证</span><i></i></li>
                <li><span>修改密码</span><i></i></li>
                <li style="width: 50px"><span >完成</span><i></i><i></i></li>
            </ul>
            <ul class="submitContent mglr30 mgt15">
                <li><span>账号：</span> 
				<input tag="帐号" placeholder="请输入账号" id="user" type="text" class="userInput"><span class="yz2" style="width: 300px"></span></li>
                <li><span>验证码：</span>
				<input tag="验证码" placeholder="请输入验证码"  id="yanzhengma" type="text" class="userInput">
                 <img id="yzm"  name="yzm" src="/index.php/Api/Swimer/yzm" onclick="this.src='/index.php/Api/Swimer/yzm/time='+Math.random();" style="cursor: pointer;width: 97px;margin-left: -100px;margin-bottom: -12px" title="点击获取" />
                 <span class="yz5" style="width: 300px"></span>
                </li>

                <li><span></span> <a class="submitBtn" onclick="sav()">确定</a></li>
            </ul>
        </div>
    </div>

    <include file="./public/footer.html"/>
   
    <div data-v-0835e1db="" class="layermbox layermbox2 layermshow" style="display: none;">
        <div data-v-0835e1db="" class="laymshade"></div>
        <div data-v-0835e1db="" class="layermmain">
            <div data-v-0835e1db="" class="section">
                <div data-v-0835e1db="" class="layermchild  layermanim">
                    <div data-v-0835e1db="" class="layermcont"><i data-v-0835e1db=""></i> <i data-v-0835e1db=""
                                                                                             class="laymloadtwo"></i> <i
                            data-v-0835e1db=""></i>

                        <div data-v-0835e1db=""></div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>
</body>
</html>
<script>
    function sav(){
        var user = $("#user").val();
        var yzm = $("#yanzhengma").val();
        if(user == ''){
            $(".yz2").html("<font color='red'>账号不能为空</font>");
            return false;
        }else {
            $(".yz2").html("");
        }
        if(yzm == ''){
            $(".yz5").html("<font scolor='red'>验证码不能为空</font>");
            return false;
        }else {
            $(".yz5").html("");
        }
        $.ajax({
            type: "POST",
            url: "{:U('Yz/resetpwd')}",
            data: {'user':user,'yzm':yzm},
            success: function(dat){
                if(dat==1){
                    $(".yz2").html("<font color='red'>该账号不存在，请重新输入</font>");
                    return false;
                }else if(dat==2){
                    $(".yz5").html("<font color='red'>验证码不正确，请重新输入</font>");
                    return false;
                }else if(dat==3){
                    window.location.href="/Index/resetWay/user/"+user;
                }
            }
        });
    }
</script>